<?php

namespace App\Http\Requests\Validators\Backend;

use App\Http\Requests\Validators\BaseValidator;

class AuthValidator extends BaseValidator
{
    public function loginRules(){
        return [
            'phone'=>'required | regex:/^1[345789][0-9]{9}$/',
            'password'=>'required',
        ];
    }

    public function attributes(){
        return [
            'phone'=>'手机号',
            'password'=>'密码',
        ];
    }

    public function messages(){
        return [
            'required'=>':attribute 必填',
            'regex'=>':attribute 格式错误',
        ];
    }
}
